package com.kalix.ynpetroleum.topology.biz;

import com.kalix.framework.core.util.ConfigUtil;
import com.kalix.ynpetroleum.topology.api.biz.ITopologyBeanService;
import com.kalix.ynpetroleum.topology.api.model.HttpRequestUtil;

/**
 *@ Author  ZhaoHang
 * @Date  2019/8/28
 **/
public class TopologyBeanServiceImpl implements ITopologyBeanService {
    public static String wsIp = (String) ConfigUtil.getConfigProp("FREEBOARD_IP","config.ynpetroleum.portconf");
    public static String wsPort =(String)ConfigUtil.getConfigProp("FREEBOARD_PORT","config.ynpetroleum.portconf");
    @Override
    public String getRoom() {
        String str ="http://"+wsIp +"/cas/login?username=admin&username2=c21hcnRhZG1pbg==&module=/machineroom/topologyView/view&hideHeader=true";
        String data= HttpRequestUtil.getXpath(str);
        return data;
    }

    @Override
    public String getBusiness() {
        String str ="http://"+wsIp +"/cas/login?username=admin&username2=c21hcnRhZG1pbg==&module=/bsm/content&hideHeader=true";
        String data= HttpRequestUtil.getXpath(str);
        return data;
    }
}
